<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
  <nz-upload
    [nzType]="i.type"
    [(nzFileList)]="fileList"
    [nzDisabled]="disabled"
    [nzAction]="i.action"
    [nzDirectory]="i.directory"
    [nzOpenFileDialogOnClick]="i.openFileDialogOnClick"
    [nzAccept]="i.accept"
    [nzLimit]="i.limit"
    [nzFilter]="i.filter"
    [nzSize]="i.size"
    [nzFileType]="i.fileType"
    [nzHeaders]="ui.headers"
    [nzData]="ui.data"
    [nzListType]="i.listType"
    [nzMultiple]="i.multiple"
    [nzName]="i.name"
    [nzShowUploadList]="i.showUploadList"
    [nzWithCredentials]="i.withCredentials"
    [nzBeforeUpload]="i.beforeUpload"
    [nzCustomRequest]="i.customRequest"
    [nzRemove]="ui.remove || handleRemove"
    [nzPreview]="handlePreview"
    [nzPreviewFile]="ui.previewFile"
    [nzDownload]="ui.download"
    [nzTransformFile]="ui.transformFile"
    (nzChange)="change($event)"
    [nzShowButton]="fileList.length < i.limitFileCount"
  >
    @switch (btnType) { @case ('plus') {
    <i nz-icon nzType="plus"></i>
    <div class="ant-upload-text" [innerHTML]="i.text"></div>
    } @case ('drag') {
    <p class="ant-upload-drag-icon"><i nz-icon nzType="inbox"></i></p>
    <p class="ant-upload-text" [innerHTML]="i.text"></p>
    <p class="ant-upload-hint" [innerHTML]="i.hint"></p>
    } @default {
    <button type="button" nz-button><i nz-icon nzType="upload"></i><span [innerHTML]="i.text"></span></button>
    } }
  </nz-upload>
</sf-item-wrap>
